function mxPoint(x, y)
{
	this.x = (x != null) ? x : 0;
	this.y = (y != null) ? y : 0;
};
mxPoint.prototype.x = null;
mxPoint.prototype.y = null;
mxPoint.prototype.equals = function(obj)
{
	return obj.x == this.x && obj.y == this.y;
};
mxPoint.prototype.clone = function()
{
	return mxUtils.clone(this);
};

function mxRectangle(x, y, width, height)
{
	mxPoint.call(this, x, y);
	this.width = (width != null) ? width : 0;
	this.height = (height != null) ? height : 0;
};
mxRectangle.prototype = new mxPoint();
mxRectangle.prototype.constructor = mxRectangle;
mxRectangle.prototype.width = null;
mxRectangle.prototype.height = null;
mxRectangle.prototype.getCenterX = function()
{
	return this.x + this.width / 2;
};
mxRectangle.prototype.getCenterY = function()
{
	return this.y + this.height / 2;
};
mxRectangle.prototype.add = function(rect)
{
	if (rect != null)
	{
		var minX = Math.min(this.x, rect.x);
		var minY = Math.min(this.y, rect.y);
		var maxX = Math.max(this.x + this.width, rect.x + rect.width);
		var maxY = Math.max(this.y + this.height, rect.y + rect.height);
		this.x = minX;
		this.y = minY;
		this.width = maxX - minX;
		this.height = maxY - minY;
	}
};
mxRectangle.prototype.grow = function(amount)
{
	this.x -= amount;
	this.y -= amount;
	this.width += 2 * amount;
	this.height += 2 * amount;
};
mxRectangle.prototype.getPoint = function()
{
	return new mxPoint(this.x, this.y);
};
mxRectangle.prototype.equals = function(obj)
{
	return obj.x == this.x && obj.y == this.y && obj.width == this.width && obj.height == this.height;
};

function mxPath(format)
{
	this.format = format;
	this.path = [];
	this.translate = new mxPoint(0, 0);
};
mxPath.prototype.format = null;
mxPath.prototype.translate = null;
mxPath.prototype.path = null;
mxPath.prototype.isVml = function()
{
	return this.format == 'vml';
};
mxPath.prototype.getPath = function()
{
	return this.path.join('');
};
mxPath.prototype.setTranslate = function(x, y)
{
	this.translate = new mxPoint(x, y);
};
mxPath.prototype.moveTo = function(x, y)
{
	if (this.isVml())
	{
		this.path.push('m ', Math.floor(this.translate.x + x), ' ', Math.floor(this.translate.y + y), ' ');
	}
	else
	{
		this.path.push('M ', Math.floor(this.translate.x + x), ' ', Math.floor(this.translate.y + y), ' ');
	}
};
mxPath.prototype.lineTo = function(x, y)
{
	if (this.isVml())
	{
		this.path.push('l ', Math.floor(this.translate.x + x), ' ', Math.floor(this.translate.y + y), ' ');
	}
	else
	{
		this.path.push('L ', Math.floor(this.translate.x + x), ' ', Math.floor(this.translate.y + y), ' ');
	}
};
mxPath.prototype.curveTo = function(x1, y1, x2, y2, x, y)
{
	if (this.isVml())
	{
		this.path.push('c ', Math.floor(this.translate.x + x1), ' ', Math.floor(this.translate.y + y1), ' ',
			Math.floor(this.translate.x + x2), ' ', Math.floor(this.translate.y + y2), ' ',
			Math.floor(this.translate.x + x), ' ', Math.floor(this.translate.y + y), ' ');
	}
	else
	{
		this.path.push('C ', (this.translate.x + x1), ' ', (this.translate.y + y1), ' ', (this.translate.x
			+ x2), ' ', (this.translate.y + y2), ' ', (this.translate.x + x), ' ', (this.translate.y + y), ' ');
	}
};
mxPath.prototype.write = function(string)
{
	this.path.push(string, ' ');
};
mxPath.prototype.end = function()
{
	if (this.format == 'vml')
	{
		this.path.push('e');
	}
};
mxPath.prototype.close = function()
{
	if (this.format == 'vml')
	{
		this.path.push('x e');
	}
	else
	{
		this.path.push('Z');
	}
};